<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <style rel="stylesheet">
        .el-header {
            background-color: #B3C0D1;
            color: #333;
            line-height: 60px;
        }

        .el-aside {
            color: #333;
        }
    </style>
</head>
<body>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<div id="app">
    <el-container style="height: 880px; border: 1px solid #eee">
        <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
            <el-menu :default-openeds="['1', '3']">
                <el-submenu index="1">
                    <template slot="title"><i class="el-icon-message"></i>网站管理</template>
                    <el-menu-item-group>
                        <template slot="title">系统管理</template>
                        <el-menu-item index="1-1" @click="userList">用户查询</el-menu-item>
                    </el-menu-item-group>
                    <el-menu-item-group title="水果信息管理">
                        <el-menu-item index="1-2" @click="fruitList">水果信息列表</el-menu-item>
                        <el-menu-item index="1-3" @click="fruitAdd">水果信息添加</el-menu-item>
                    </el-menu-item-group>
                    <el-menu-item-group title="订单信息">
                        <el-menu-item index="1-4" @click="orderList">订单列表</el-menu-item>
                    </el-menu-item-group>
                </el-submenu>
            </el-menu>
        </el-aside>

        <el-container>
            <el-header style="text-align: right; font-size: 12px">
                <el-dropdown>
                    <i class="el-icon-setting" style="margin-right: 15px"></i>
                </el-dropdown>
                <span>后台管理</span>
            </el-header>

            <el-main>
                <iframe :src="srcUrl" frameborder="0" width="100%" height="660"></iframe>
            </el-main>
        </el-container>
    </el-container>

</div>
<script type="text/javascript">
    var vm = new Vue({
        el: '#app',
        data: {
            srcUrl: '',
        },
        methods: {
            userList: function (event) {
                this.srcUrl = '/manage/user/list.jsp';
            },
            fruitList: function(event){
                this.srcUrl = '/manage/fruit/list.jsp';
            },
            fruitAdd: function(event){
                this.srcUrl = '/manage/fruit/add.jsp';
            },
            orderList: function(event){
                this.srcUrl = '/manage/order/list.jsp';
            }
        }
    })
</script>
</body>
</html>